<?php
/**
 *
 * @author Strawberry🍓
 * @date 2021-05-21 4:08 下午
 *
 */

namespace app\common\model\tang;


use app\common\impl\Comm;
use app\common\model\CommonBaseModel;

class MerchantMobile extends CommonBaseModel implements Comm
{

    public function getAdminPageData($param = [], $order = 'id asc')
    {
        // TODO: Implement getAdminPageData() method.
        $where=[];
        $model = self::where($where);
        $data = $model->order($order)->page(PAGE)->limit(LIMIT)->select()->toArray();
        $count = $model->count("id");
        return parent::ajaxResult($data, $count);
    }

    public function delById($ids)
    {
        // TODO: Implement delById() method.
        $result = self::update([
            'status'=> -1
        ],['id'=>$ids]);
        if ($result) {
            return self::JsonReturn("冻结成功");
        } else {
            return self::JsonReturn("冻结失败",0);
        }
    }


    public function doAll($data)
    {
        // TODO: Implement doAll() method.
        return parent::doAllData($data);
    }

}